FROM node:lts-alpine AS Builder
WORKDIR /app
COPY package.json package-lock.json /app/
RUN npm install
COPY . /app
RUN npm run build

FROM nginx:stable-alpine
LABEL maintainer="762902674@qq.com"

COPY docker_build/config/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=Builder /app/dist /usr/share/nginx/html/test-vue

CMD ["nginx", "-g", "daemon off;"]
